const koa = require('koa');
const Router = require('koa-router');
const app = new koa();
const ws = require('./Socket');


// app.use(ctx => {
//   ctx.body = `<p>
//   <a href="/demo" target="_blank">/demo</a>
//   </p>`;
// })
const router = new Router();
router.all('/demo', (ctx) => {
  ws.sendToCliect({id:'aa',msg:'hahahah'});
  ctx.body = 222;
})



app.use(router.routes());

module.exports = app;